import requests
from bs4 import BeautifulSoup

url = 'http://www.zishazx.com/product'
headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36',
}
res = requests.get(url, headers=headers)
# print(res.content.decode())
soup = BeautifulSoup(res.content.decode(), 'lxml')
# 查找当前ul class为list clearfix的所有儿子li
li_list = soup.find('ul', class_="list clearfix").findAll('li')
# print(li_list)

for li in li_list:
    # 封面
    print(li.find('img')['src'])
    # 获取名称
    print(li.find('p', class_="name").string)
    # 获取编号
    print(li.find('p', class_="p_no").string)